package tile;

public class ItemTile
    extends Tile
{
    private String type;

    public ItemTile(final int x, final int y, final String item) {
        super(x, y, "Item");
        type = item;
    }


    public String getItemType() {
        return type;
    }

    @Override
    public String toString() {
        return super.toString() + " " + type;
    }

    @Override
    public boolean equals(Object other) {
        if(super.equals(other)) {
            ItemTile temp = (ItemTile)other;
            return this.getItemType().equals(temp.getItemType());
        }
        return false;
    }
}
